-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
used shellcheck, some fixes, added new countries, added new support for url query parameter #10
base: master
Are you sure you want to change the base?
Conversation
https://github.com/koalaman/shellcheck fixed SC2128: Expanding an array without an index only gives the first element. https://github.com/koalaman/shellcheck/wiki/SC2128
https://github.com/koalaman/shellcheck fixed SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo' https://github.com/koalaman/shellcheck/wiki/SC2116 query, code and country variable to an array changed case statement
fixed SC2162: read without -r will mangle backslashes. https://github.com/koalaman/shellcheck/wiki/SC2162
SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. https://github.com/koalaman/shellcheck/wiki/SC2181
added support for 'ip_version' parameter added support for 'use_mirror_status' parameter
Looks good! Only thing is running default with no options does not work. I'll have to look at it more soon |
Can you verify this? When running fetchmirrors without any options it shows usage info and not country select list. |
The search function is broken |
I will be more than happy to merge this and update on the AUR but the search function needs to be working. One of the problems is the line with: [ -z "$1" ] causes the program not to even use the search section, this line needs to be removed and only the line checking for root left. Beyond that when you enter the search function it fails when you select a country number. |
When I invoke fetchmirrors without sudo and without any arguments it shows the (modified) usage info.
my output with "my" fetchmirrors:
|
I dont understand what you mean by "The search function is broken", could you provide an sample search term or any further information. ;) I have recorded my terminal via https://asciinema.org. the parameterless call. https://asciinema.org/a/5ugAH0aTnlKZdpavY65Z4hdvi Maybe you could do this to, so i can understand what you mean. :) |
@deadhead420 could you provide some Information? |
I used shellcheck to validate the script.
see the commits
added new countries